<?php
  if (!isset($_SERVER['PHP_AUTH_USER'])) {
    header('WWW-Authenticate: Basic realm="Alleen voor intern gebruik"');
    header('HTTP/1.0 401 Unauthorized');
    echo 'U drukte op cancel';
    exit;
  } else {
    echo "<p>Hallo {$_SERVER['PHP_AUTH_USER']}.</p>";
    echo "<p>Je password is {$_SERVER['PHP_AUTH_PW']}.</p>";
  }
?>
